{include file="public/_header" /}

<div class="x-body">

    <a class="layui-btn layui-btn-small" class="layui-btn layui-btn layui-btn-mini " style="float: right"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i>
    </a>

    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <form action="" method="post" class="ajax-form">
            <table class="layui-table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>代理商法人</th>
                    <th>代理商公司名称</th>
                    <th>代理商电话</th>
                    <th>代理商有效联系人</th>
                    <th>担保人姓名</th>
                    <th>担保人电话号</th>
                    <th>担保人关系</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody class="tr-data">
                {volist name="data" id="vo"}
                <tr>
                    <td>{$vo.id}</td>
                    <th>{$vo.legal_person}</th>
                    <th>{$vo.company_name}</th>
                    <th>{$vo.mobile}</th>
                    <th>{$vo.linkman}</th>
                    <th>{$vo.secure_name}</th>
                    <th>{$vo.secure_mobile}</th>
                    <th>{$vo.secure_relation}</th>
                    <td>{$vo.create_time|date="Y/m/d",###}</td>
                    <td class="td-manage">
                        <a title="编辑"   class="layui-btn layui-btn layui-btn-mini "
                           onclick="editAgent('编辑代理商','{:url('agent/edit',['id'=>$vo.uid])}',900,500)"
                           href="javascript:;">
                            <i class="layui-icon">编辑</i>
                        </a>

                        <a title="查看"  class="layui-btn layui-btn layui-btn-mini"
                           onclick="x_admin_show('查看','{:url('agent/person_agent',['id'=>$vo.uid])}',900,500)"
                           href="javascript:;">
                            <i class="layui-icon">查看</i>
                        </a>

                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            第{$data->currentPage()}页&nbsp;&nbsp;共{$data->total()}条
            </form>
        </div>
        <div class="page" style="float:  right">
            {$data->render()}
        </div>
    </div>
    {include file="public/_footer" /}
    <script>
        layui.use('laydate', function () {
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#start' //指定元素
            });

            //执行一个laydate实例
            laydate.render({
                elem: '#end' //指定元素
            });
        });


        layui.use(['form', 'layer'], function () {
            $ = layui.jquery;
            var form = layui.form
                    , layer = layui.layer;
            var util = layui.util;
        });



        /**
         * @param title 标题
         * @param url 请求的url
         * @param w 弹出层宽度（缺省调默认值）
         * @param h 弹出层高度（缺省调默认值）
         */
        function editAgent(title,url,w,h){
            if (title == null || title == '') {
                title=false;
            };
            if (url == null || url == '') {
                url="404.html";
            };
            if (w == null || w == '') {
                w=($(window).width()*0.9);
            };
            if (h == null || h == '') {
                h=($(window).height() - 50);
            };
            layer.open({
                type: 2,
                area: [w + 'px', h + 'px'],
                fix: false, //不固定
                maxmin: true,
                shadeClose: true,
                shade: 0.4,
                title: title,
                content: url, end: function () {
                    javascript:location.replace(location.href);
                }
            });
        }



    </script>
    <script>var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();</script>
    </body>

    </html>